import config from "@/config"
import http from "@/utils/request"

export default {
	menu: {
		myMenus: {
			url: `${config.API_URL}/v1/sysmenu/getmenu`,
			name: "获取我的菜单",
			get: async function(){
				return await http.get(this.url);
			}
		},
		list: {
			url: `${config.API_URL}/v1/sysmenu/tree`,
			name: "获取tree菜单",
			get: async function(){
				return await http.get(this.url);
			}
		}
	},
	dic: {
		tree: {
			url: `${config.API_URL}/v2/sys-dic-category/treelist`,
			name: "获取字典树",
			get: async function(){
				return await http.get(this.url);
			}
		},
		list: {
			url: `${config.API_URL}/v2/sys-dic-data/page`,
			name: "字典树列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		addorupdatecategory:{
			url: `${config.API_URL}/v2/sys-dic-category/saveorupdate`,
			name: "更新/新增字典分类",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		addorupdatedicdata:{
			url: `${config.API_URL}/v2/sys-dic-data/saveorupdate`,
			name: "更新/新增字典数据",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		get: {
			url: `${config.API_URL}/v2/system/dic/get`,
			name: "获取字典数据",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	role: {
		list: {
			url: `${config.API_URL}/v1/sysrole/page`,
			name: "获取角色列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		getuserrole:{
			url: `${config.API_URL}/v1/user/getUserRole`,
			name: "获取用户角色",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	dept: {
		list: {
			url: `${config.API_URL}/v1/sys-dept/list`,
			name: "获取部门列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		treelist:{
			url: `${config.API_URL}/v1/sys-dept/gettree`,
			name: "获取部门tree列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	user: {
		list: {
			url: `${config.API_URL}/v1/user/page`,
			name: "获取用户列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	app: {
		list: {
			url: `${config.API_URL}/v2/sys-app/page`,
			name: "应用列表",
			get: async function(){
				return await http.get(this.url);
			}
		}
	},
	log: {
		list: {
			url: `${config.API_URL}/v2/sys-log/page`,
			name: "日志列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		getdatelist:{
			url: `${config.API_URL}/v2/sys-log/getlogtotal`,
			name: "日志统计",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	table: {
		list: {
			url: `${config.API_URL}/v2/sys-table/page`,
			name: "表格列管理列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		tables:{
			url: `${config.API_URL}/v2/sys-table/gettables`,
			name: "获取系统表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		getTableInfo:{
			url: `${config.API_URL}/v2/sys-table/gettableinfo`,
			name: "获取表的字段",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		saveTableInfo:{
			url: `${config.API_URL}/v2/sys-table/saveorupdate`,
			name: "数据表的保存",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
		info: {
			url: `${config.API_URL}/v2/sys-table/getbyid`,
			name: "表格列管理详情",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	tasks: {
		list: {
			url: `${config.API_URL}/v2/system/tasks/list`,
			name: "系统任务管理",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		logs:{
			url: `${config.API_URL}/v2/sys-job-record/page`,
			name: "系统任务日志",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	}
}
